package com.itheima.actuator;

import org.springframework.boot.actuate.endpoint.annotation.Endpoint;
import org.springframework.boot.actuate.endpoint.annotation.ReadOperation;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

/**
 * ClassName: PayEndpoint
 * Description:
 * Date: 2023/03/22 AM 12:16:54
 * <p>
 * project: springboot
 * package: com.itheima.actuator
 * email: 1085844536@qq.com
 * version:
 *
 * @author WangGuojian
 */
@Component
@Endpoint(id = "pay", enableByDefault = true)
public class PayEndpoint {

    @ReadOperation
    public Object getPay() {
        Map<String, String> pay = new HashMap<>(16);
        pay.put("level 1", "300");
        pay.put("level 2", "291");
        pay.put("level 3", "666");
        return pay;
    }

}
